﻿@{
    Layout = null;
}
<script type="text/javascript">
    $(function () {
        $("#datagrid").flexigrid({
            url: '@VBO.ModelListPage.Url',
            dataType: '@VBO.ModelListPage.DataType',
            colModel: [
		        @RenderSection("colmodels",false)
		    ],
            sortname: "@VBO.ModelListPage.Sortname",
            sortorder: "@VBO.ModelListPage.Sortorder",
            usepager: @VBO.ModelListPage.Usepager,
            title: '@VBO.ModelListPage.Title',
            useRp: true,
            rp: @VBO.ModelListPage.Pagesize,
            width: "auto",
            height: Utils.getGridHeight(),
            resizable:false,
            useCheckbox:true,
            rpOptions:[@Html.Raw(String.Join(",",VBO.ModelListPage.Pagesizes))],
            paramcontainer:@Html.Raw(String.IsNullOrWhiteSpace(VBO.ModelListPage.Paramcontainer)?"false":"\""+VBO.ModelListPage.Paramcontainer+"\"")
        });
        $(window).resize(function () {
            $("#datagrid").flexResize(Utils.getGridHeight());
        });
    });
</script>
<div style="width:100%">
<table class="datagrid" id="datagrid"></table>
</div>